On the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k,\ell )$$\end{document}(k,ℓ)-anonymity of networks via their k-metric antidimension

This work focuses on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k,\ell )$$\end{document}(k,ℓ)-anonymity of some networks as a measure of their privacy against active attacks. Two different types of networks are considered. The first one consists of graphs with a predetermined structure, namely cylinders, toruses, and 2-dimensional Hamming graphs, whereas the second one is formed by randomly generated graphs. In order to evaluate the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k,\ell )$$\end{document}(k,ℓ)-anonymity of the considered graphs, we have computed their k-metric antidimension. To this end, we have taken a combinatorial approach for the graphs with a predetermined structure, whereas for randomly generated graphs we have developed an integer programming formulation and computationally tested its implementation. The results of the combinatorial approach, as well as those from the implementations indicate that, according to the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k,\ell )$$\end{document}(k,ℓ)-anonymity measure, only the 2-dimensional Hamming graphs and some general random dense graphs are achieving some higher privacy properties.

Social network analysis is the process of investigating social structures while making use of networks and graph theory methods.Such analysis is widely developed in our modern society.This is motivated by several factors including for instance the increasing need of advances in basic computing and information technologies.These advances aim at improving systems and services frequently integrated within a variety of important business and societal functions, like e-commerce, health care, education, manufacturing, and personal interactions, among others.
The usefulness of social network analysis is doubtless, since many different social services can benefit from these investigations.These benefits are, however, not cost-free, as the privacy of the users of a network would be compromised if some involved entity could deliver sensitive data such as e-mails, instant messages, or relationships.A basic solution to the above issue prevents such a risk by applying some anonymization process to the released social network.For example, potentially identifying attributes can be removed.Nonetheless, this naive approach is usually not enough to guarantee the privacy of users personal information in a network.In fact, there is always some potential probability of disclosing any user.Therefore, it would be highly desirable that every public social network would incorporate a measure of this disclosing probability.
Some primitive approaches to measuring the above probability were first proposed in 1 and later slightly improved in 2 .The main idea of these approaches was to introduce a measure against active privacy attacks for social networks called (k, ℓ)-anonymity.Specifically, in 1 it was stated that a social graph achieving (k, ℓ)-anonymity satisfies that the probability of disclosing any given user of that network, in the presence of at most ℓ attacker nodes in the network, is 1/k.The (k, ℓ)-anonymity is theoretically supported by a graph theory parameter called k-metric antidimension, which was introduced in 1 as well.
In the definition of the (k, ℓ)-anonymity, the integer k is used as a privacy threshold, whereas the value ℓ stands for an upper bound on the expected number of attacker vertices in a given network.Since an attacker entity cannot easily control many vertices of the network, it is usually accepted that the number of attacker nodes in a network is likely to be significantly smaller than the total number of vertices, so it is assumed that ℓ is a small integer number.
Given the tight relationship between the above two concepts, a key point for stating the (k, ℓ)-anonymity of a given graph G is finding its k-metric antidimension.This research topic has received the attention of several researchers.The k-metric antidimension has been studied as a graph parameter separately from the (k, ℓ)-anonymity in several recent works, like for instance in 2-7 , and also in the more general survey 8 , which contains a compilation of the main contributions on this topic.Further studies focusing on the combinatorial and computational properties of the k-metric antidimension of a graph have contributed to a better application

Definitions and basic concepts
Throughout this paper we consider an undirected non-weighted and connected graph G = (V , E) with |V | = n without loops or multiple edges.We further assume that the users are represented in a graph by its vertices.While the edges represent some kind of relationship between the users.The length of any given path in G is given by its number of edges and, for any pair of vertices u, v ∈ V , the distance between u and v is the length of a shortest u, v-path, which is denoted by d(u, v) (or d uv for short).For a given vertex v ∈ V , the eccentricity of v is e(v) = max{d(v, x) : x ∈ V } .Moreover, for the vertex v, any vertex u such that d(v, u) = e(v) is called an eccentric vertex of v.Note that these are the furthest possible nodes from v. Now, the following concepts are the key points of our whole work.
With the above concepts, Trujillo-Rasua and Yero 1 introduced the following measure corresponding to a probability index that quantifies how secure a network is with respect to active attacks to its privacy.Definition 2 ( 1 ) A graph G meets (k, ℓ)-anonymity with respect to active attacks, if k is the smallest positive integer such that the k-metric antidimension of G is not larger than ℓ.
The concepts from Definition 1 can be also seen from a different perspective.For a given vertex set S ⊂ V , we define the following equivalence relation R S .Two vertices x, y ∈ V \ S are related by R S if for every vertex z ∈ S it follows that d xz = d yz .From now on, for a given set S ⊂ V , we consider Z S = {Z 1 , . . ., Z r } , for some r ≥ 1 , as the set of equivalence classes defined by R S .By using the terminology above, it is readily seen that any vertex set This approach to the definition of k-ARS turns www.nature.com/scientificreports/out to be in general more useful while dealing with this topic.Since r = n k − 1 is an upper bound on the number of non-empty sets Z r defined above, in the following we assume that R = {1, . . ., r}.
Observe that, according to Definition 2, the problem of determining adim k (G) for a given graph G can be stated as the following optimization problem: We first recall that solving k-MAD is in general NP-hard, as independently proved in 10 and 11 .Moreover, it is clear that a given graph G may not contain a k-ARS for every value k.In connection with this, it is said that a graph G is κ-metric antidimensional if k = κ is the largest integer for which G contains a k-ARS.In contrast to (k-MAD), which is NP-hard, it was proved in 10 that the value κ can be found polynomially in the order n of G.However, knowing that a graph G is κ-metric antidimensional does not imply that there exists a k-ARS for another k ∈ {2, . . ., κ − 1} (note that we can always find a 1-ARS).One reason for this relies on the fact that there is no monotonicity (with respect to k) for adim k (G) .Nevertheless, there are families of graphs for which the monotonicity of adim k (G) relative to k has been confirmed.For instance, in 9 it was proved that a κ-metric antidimensional tree T contains a k-ARS for every k ∈ {1, . . ., κ} .Still, even if a tree T contains a k-ARS for every k ∈ {1, . . ., κ} , we must also recall that a general procedure for computing an optimal k-ARSs for an arbitrary value of k in the interval {1, . . ., κ} is not yet known.That is, for general trees it is not known how difficult it is to find the k-metric antidimension.This supports the interest of considering the case of randomly generated trees and computing their k-metric antidimension.
Regarding this situation, the existence of k-ARSs can be dealt with the following combinatorial problem: In the remainder of this paper, when a graph G has no k-ARS for some k ∈ {1, . . ., κ} , we will say that adim k (G) = +∞.
The optimization problem (k-MAD) and the combinatorial one (k-ARS) above shall be considered during our whole exposition.Specifically, for any studied graph G, we shall compute the largest value κ for which G is κ -metric antidimensional.This will provide us the interval of integers in which the k-metric antidimension might be computed.We shall then consider such interval {1, . . ., κ} for G, and study the existence of k-ARSs for every k ∈ {1, . . ., κ} .Hence, whenever possible, we will compute the value of adim k (G) .With the obtained results, the (k, ℓ)-anonymity satisfied for the corresponding graphs shall be stated.

Networks with a predetermined structure
This section considers some graphs that are obtained as the Cartesian product of some other graphs.Such graph products are constructions that are widely used in several investigations covering theoretical studies as well as applied ones.They have a symmetric structure, which intuitively makes them good candidates to satisfy (k, ℓ) -anonymity for large values of k.The Cartesian product of two graphs G and H, is the graph G H with vertex set V (G H) = V (G) × V (H) .Two vertices (g, h), (g ′ , h ′ ) are adjacent in G H if either g = g ′ and hh ′ ∈ E(H) , or gg ′ ∈ E(G) and h = h ′ .For a comprehensive compendium on product graphs, their structure, applications, recognition, etc. we suggest the book 12 .
We first recall well-known results for grid graphs, whose k-antidimension is known, and then we focus on cylinders, toruses and 2-dimensional Hamming graphs, for which the (k, ℓ)-anonymity has not yet been studied.The grid graph P r P s is the Cartesian product of two paths The k-metric antidimension of the grid graph P r P s (for r, t ≥ 2 ) was studied in 3 , and it is as follows.First, P r P s is 4-metric antidimensional when r, s are both odd; and otherwise it is 2-metric antidimensional.When r, s are both odd it is not possible to find 3-ARSs.In consequence, the following formulas are known (see 3 ).
From the results above, one can deduce that the grids P r P s are only satisfying (1, 1)-anonymity, since (in the presence of already one attacker node) the smallest value for which adim k (P r P s ) ≤ 1 is k = 1.
We next consider the cylinder P r C s , the torus C r C s and the so-called 2-dimensional Hamming graph K r K r , where, following the usual notation, C r = u 0 u 1 • • • u r−1 u 0 and K r , respectively, represent a cycle and a complete graph of order r.We first find the values κ for which such graphs are κ-metric antidimensional and then establish their (k, l)-anonymity.In order to facilitate the flow of our exposition, we present in this section the obtained results and include all the proofs in Section "Proofs".Proposition 3.1 Let r, s ≥ 2 be two integers.
s is even, and otherwise, it is 2-metric antidimensional.(ii) If r, s ≥ 3 , then C r C s is 4-metric antidimensional if r, s have the same parity, and otherwise, it is 2-metric antidimensional.
For a given integer k and a graph G : Does G contains a k-ARS?(k-ARS) In concordance with Proposition 3.1, we next give the exact values of the k-metric antidimension of cylinders, toruses and 2-dimensional Hamming graphs for those suitable values of k, namely those values of k not larger than κ (for each corresponding graph).We begin with the cylinder P r C s .

Theorem 3.2 For every integers r ≥ 2 and s ≥ 3,
The next result presents the k-metric antidimension of the torus C r C s , in concordance with Proposition 3.1 (ii).

Theorem 3.3 For every two integers r, s ≥ 3,
In the next result we compute the k-metric antidimension of the 2-dimensional Hamming graph for the suitable values of k, according to Proposition 3.1 (iii).

Theorem 3.4 For every r ≥ 4,
The (k, ℓ)-anonymity of cylinders, toruses and 2-dimensional Hamming graphs Theorems 3.2, 3.3 and 3.4 lead to the measures in Table 1, for the corresponding graphs studied in each case, under the assumption of the existence of one attacker vertex ( ℓ = 1).
In addition to the results in Table 1, we can also note that, for instance, if r, s are both odd, then the torus graph C r C s achieves (4, 1)-anonymity in the presence of only one attacker vertex.Therefore, we can readily observe that 2-dimensional Hamming graphs are the most "secure" networks with respect to active attacks to their privacy, among those ones we have considered so far.This property is possibly related to the high symmetry of 2-dimensional Hamming graphs as well to the small diameter (of value only two) of such graphs.

Integer programming formulation for the k-MAD problem
In this section we develop an integer programming formulation for finding the k-metric antidimension of a given graph G. Abusing slightly the notation, we also denote by V = {1, . . ., n} the set of indices associated with the vertices of the graph in a natural way.The formulation, which is based on the definition of a k-ARS S, through the equivalence relation R S , is built over two sets of binary decision variables, one to determine the elements of the set S and another one to determine the elements of the different classes.The vertex classes are determined by subsets of vertices that jointly satisfy some compatibility conditions, and will be referred to as Q-subsets.if k = 1 and r, s are not both even .We define the following sets of decision variables: The above decision variables determine vertex sets S = {u ∈ V : s u = 1} of cardinality |S| = u∈V s u , and Q-sub- sets Q u = {v ∈ V : q uv = 1} .Since q uu = 1 indicates that u is the lowest index vertex of a Q-subset, the actual number of classes determined by the solution is r = u∈V q uu .The formulation is as follows.Proof Let (s, q) ∈ � .Consider S = {u ∈ V : s u = 1} and the Q-subsets Q u = {v ∈ V : q uv = 1} .Let us see that these Q-subsets are precisely the classes determined by the equivalence relation R S .To this end, we analyze the meaning of the constraints: • Constraint (2) guarantees that the vertex set S is non-empty.
• Constraints (3) ensure that we obtain a partition by imposing that each vertex u ∈ V belongs either to set S ( s u = 1 ) or to some Q-subset, where the representative is either vertex u or a vertex with a lower index.• Constraints (4) guarantee that the cardinality of each Q-subset is at least k.Note that these constraints are only active when u is the representative of some Q-subset ( q uu = 1 ) and impose that, in such a case, the Q-subset associated with u has at least k − 1 additional elements.This guarantees that |Q u | ≥ k. • Constraints (5) ensure that the Q-subsets are well defined so the pairs of vertices in each component satisfy the compatibility criterion, by imposing that no two vertices v, w ∈ V with different distance to any vertex u ∈ S may belong to the same Q-subset.When w = u these constraints impose that the Q-sets only contain vertices that are not in S. • The role of Constraints ( 6) is to guarantee that the obtained Q-subsets are precisely the classes determined by the equivalence relation R S .In other words, they guarantee that all the vertices in the same equivalence class of R S are assigned to the same Q-subset.Note that Constraints (5) do not guarantee this condition since, in principle, two vertices of the same equivalence class of R S could be assigned to different Q-subsets.
Observe that the constraint (6) associated with a given vertex pair u, v ∈ V , u < v is only active when u is the representative of Q-subset Q u .In such a case, the constraint holds trivially if v belongs either to S or to Q u .Otherwise, the constraint imposes that there exists some vertex w ∈ S such that d uw = d vw .That is, u and v do not belong to the same the equivalence of R S .
The conclusion of the above analysis is that any feasible solution (s, q) ∈ � determines a k-ARS and its objective function value |S| = u∈V s u .
Below we see that the reverse of the above result also holds.In particular (1) www.nature.com/scientificreports/Proposition 4.2 Any k-ARS S ⊂ V , {Z r } r∈R can be associated with a solution in (s, q) ∈ �.
Proof Let S ⊂ V , {Z r } r∈R be a given k-ARS.Consider the following solution (s, q): • s u = 1 if and only if u ∈ S.
• q uv = 1 if and only if u, v ∈ Z r , u < v , and q u r u r = 1 with u r = min{u : Let us see that (s, q) ∈ �: • S = ∅ implies that there exists u ∈ S , and thus (2) holds.
• Since S ⊂ V , {Z r } r∈R is a k-ARS, for any class r ∈ R it holds that for any pair of vertices v, w ∈ V such that d uv = d uw for some u ∈ S , then v and w cannot both belong to the same equivalence class Z r = Q u r , r ∈ R .
In other words, if s u = 1 , then q vw = 0 for all r ∈ R .Hence, (s, q) also satisfies constraints (5).
for all r ∈ R .Hence the constraints (4), which are only activated for the vertices u r , r ∈ R , are satisfied by (s, q).Remark 4.1 Note that Constraints (2) in formulation F impose that the vertex set S induced by the solution is non-empty.This means that the optimal value of F will be adim k (G) , when a k-ARS exists.However, when no k-ARS exists for a given value of k, then the formulation F will have no feasible solution.
As a consequence of the above analysis, we deduce the following statement.
Corollary 4.3 F is a valid formulation for (k-MAD) on a given graph G = (V , E) .When F is feasible, then its optimal value determines adim k (G).Otherwise, if F is infeasible, then no k-ARS exists.
Proof As a consequence of Propositions 4.1 and 4.2, there is a one-to-one correspondence between k-ARS and feasible solutions in .Moreover, the objective function value of feasible solution (s, q) ∈ � , is |S| = u∈V s u .Therefore, since F is a minimization problem, any optimal solution to F will determine a k-ARS and its objective function value adim k (G) .
The formulation F above has n + n 2 binary decision variables, and a number of constraints O 1 + 2n + (n + 1) n 2 .In particular, the number of Constraints ( 5) is (n − 2) n 2 .Since this number can be too big as the number of vertices of the graph increases, we develop an aggregated version of this set of constraints, namely: which takes into account that in any feasible solution S, for any pair v, w ∈ V , v < w , it holds that u∈V :d uv � =d uw s u ≤ u∈V s u ≤ n .Since the right hand side of Constraints ( 8) is precisely n, the constraint asso- ciated with a given pair of vertices v, w prevents that both vertices belong to the same Q-set when there exists some vertex u ∈ S such that d uv = d uw .Hence by substituting Constraints (5) with Constraints (8) we obtain an alternative valid formulation for (k-MAD), which will be referred to as F A .Note that the number of Con- straints (8) is n 2 2 , which is one order of magnitude less than that of Constraints (5).

Computational results
In order to analyze the empirical performance of formulation F A we have carried out a series of computational experiments.The objective of these experiments is twofold.On the one hand, to analyze the effectiveness and scalability of F A for different classes of graphs, and on the other hand, to serve as an empirical support for the classes of graphs for which theoretical results are not known.All the computational tests have been carried out in an AMD Ryzen 7 PRO 2700U 2.20 GHz with 8 GB RAM, under Windows 10 Pro as operating system.Formulation F A has been coded in Mosel 5.6.0 using as solver Xpress Optimizer Version 38.01.01 13 .The source files are available at https:// github.com/ MMuno zMarq uez/ Graph Antid imens ion.No data files are needed to run those models.
For the experiments, we have considered the following sets of benchmark instances: as directed and rooted at vertex 1.Then all directions are removed to obtain the resulting undirected tree.The arcs of the original rooted tree are generated by iteratively exploring its vertices and randomly generating up to δ descendants, among the vertices not yet explored.For each combination of n and δ two instances have been generated.• S instances: General sparse graphs with a number of vertices n ∈ {50, 100, 200} and vertex degrees δ ∈ {6, 11} .
Similarly to the case of the trees, originally directed graphs are generated and then all directions removed.The arcs of the graph are generated by iteratively exploring its vertices and randomly generating up to δ end- nodes (from the original vertex set) for the arcs with origin at the current vertex.For each combination of n and δ two instances have been generated.• D instances: General dense graphs with a number of vertices n ∈ {50, 100, 200} , vertex degrees δ ∈ {40, 45} for n = 50 , δ ∈ {90, 95} for n = 100 and δ ∈ {180, 190} for n = 200 .For each combination of n and δ two instances have been generated by removing δ randomly generated edges from the complete graph K n .
Cylinder and torus instances have been solved for values of k ∈ {1, 2, 3, 4} , whereas instances in the other classes has been solved for values of k ∈ {1, 2, 3, 4, 5, 6} .A computing time limit of 7200 seconds has been set for each solved instance.Table 2 shows the number of variables and constraints in formulation F A for the considered benchmark instances.
Tables 3, 4, 5, 6, 7 summarize the obtained results for each of the classes above.All tables show the values of the instance parameters in the first columns, which are followed by k blocks, with two columns each, corresponding to the considered values of k.The first column in each block, labeled with |S| gives the optimal values for the k-metric antidimension of the instances; an entry NF (Not Feasible) in this column indicates that no k-ARS exists for the tested value of k; that is, adim k (G) = +∞ .For the classes where two instances have been generated for each combination of parameters values (trees and sparse and dense graphs), the entries in columns |S| show only one value when the optimal value coincided for both instances, whereas the two (different) optimal values are indicated otherwise.The second column in each block, labeled with CPU gives the computing time required by the solver to obtain a provable optimal solution, or to show that no feasible solution exists.In Tables 5, 6, 7 the results in these columns are the averages over the two instances with the same characteristics.For classes S & D some of the largest instances with n = 200 could not be solved to proven optimality within the comput- ing time limit.For these instances (identified with TL in column CPU) the value of the best found solution is presented in the tables.Table 5. Summary of results for T instances: trees with n vertices and vertex degree δ.  www.nature.com/scientificreports/As it could be expected, the results in Tables 3, 4 confirm the theoretical results proved in Theorems 3.2 and 3.3, and the validity of formulation F A .In general, for fixed parameters values, cylinder instances P C can be solved in smaller computing times than torus instances C C , although differences are rather small and there are a few exceptions.Indeed the dimensions of the instances affect computing times, which notably increase with the values (r, s).For a fixed dimension, the value of parameter k does not seem to noticeable affect computing times.On the contrary, instances with higher optimal values (higher values of |S|) as well as infeasible instances seem to be computationally more demanding.
The results of Table 5 indicate that all but four T instances (trees) were feasible.For k = 1 the optimal value was always |S| = 1 , which was also the optimal value for most instances with k > 1 .There are indeed exceptions, particularly for small instances as the value of k increases and gets close to δ .Moreover, for δ = k = 6 , some T instances were proved to be infeasible, namely the two 50-vertex instances as well as the two 100-vertex instances.Similarly to P C and C C instances, the computing times increase with the number of vertices in the graph, but do not seem to be particularly affected by the value of the parameter k.Taking into account the number of variables and constraints involved in the formulation, instances were solved in reasonable computing times.In particular, all instances with n ∈ {50, 100} were solved in less than one hour of computing time.Still, the 200 vertex instances where computationally more demanding, particularly for larger values of k, although all of them could be solved within the maximum time limit of two hours.
As can be seen in Table 6, all S instances (general sparse graphs) with n ≤ 100 were feasible, and most of them had an optimal value |S| = 1 ; when |S| > 1 , the optimal value of such instances was |S| = 2 , even when the degree of the vertices is close to the value of k.This seems to indicate that, for sparse graphs, allowing cycles reduces the influence of parameter k, and facilitates the existence of feasible solutions, at least when n ≤ 100 .However, for five instances with n = 200 no feasible solution was found.In four of these cases the time limit was reached, so it is not known whether no feasible solution exists for these instances, although this seems unlikely since most of the times a feasible solution (possibly not an optimal one) is found early in the optimization process.For the fifth instance (with parameters δ = 25 and k = 6 ) the optimization process terminated with S = ∅ thus proving that no feasible solution exists for that instance.In general, computing times are higher to those of T instances with the same parameters values, and the increase becomes more evident as the number of vertices raises.In particular, nine instances with n = 200 could not be solved to proven optimality within the limit of two hours.While a feasible solution was found within the time limit for five of these instances, no feasible solution was obtained for the other four instances within the allowed computing time.Table 7 shows a similar behavior for D instances (general dense graphs).All but two instances were feasible, and the time limit was reached in the two cases where no feasible solution could be found.It can now be observed that, even if in some cases |S| = 1 , most instances had an optimal value of |S| = 2 , and in some cases |S| = 3 .The computing times required to solve D instances are in the same range as those of S .This can be explained by the fact that the number of variables and constraints of formulation F A depend on the number of vertices of the graph, but do not depend on the number of edges.
On the other hand, in order to further analyze (k-ARS), and the influence of the parameter k on the feasibility and optimal values of instances, we run a final series of experiments in which we solved instances for increasing values of k starting with k = 1 .We now used the T , S and D instances with n = 100 .Each of these instances was solved for varying values of the parameter k, 1 ≤ k ≤ min{δ, ⌊ n 2 ⌋}.Table 8 summarizes the obtained results on tree instances T , whereas Tables 9, 10, 11 summarize the results on instances S and D.
The results of the implementations appearing in Table 8 show that the existence of k-ARSs in a tree is always possible, for every k between 1 and the maximum value that gives a feasible solution.This confirms the theoretical The (k, ℓ)-anonymity met by the randomly generated graphs The computational results presented in the tables of this section allow to conclude that, in general, graphs randomly generated are usually satisfying a low security with respect to active attacks to its privacy, under the  www.nature.com/scientificreports/assumption of the existence of one or two attacker vertices ( ℓ = 1 or ℓ = 2 ).In particular, we conclude the following.
• General sparse graphs belonging to S instances sometimes satisfy (1, 1)-anonymity (usually when the graphs have smaller order), and sometimes (2, 1)-anonymity (more frequently when the graphs are of larger order).• For the case of general dense graphs belonging to D instances, there are very few cases such that there is a value of k for which adim k (G) ≤ 1 .This could indicate that such graphs achieve a higher security with respect to active attacks.For such dense graphs, we observe that they usually satisfy (1, 2)-anonymity, i.e., an attacker needs to control at least two vertices in such graphs to have some success.
The results of the last item are consistent with the characteristics of dense graphs, which are likely to have a small diameter as well as nearly-symmetrical structures, similarly to 2-dimensional Hamming graphs, which have been proved to have the highest security properties with respect to their privacy.

Proofs
We next include the proofs of the results presented in Section "Networks with a predetermined structure".The proofs follow somehow a similar structure.We first give conditions that a given set of vertices must satisfy in order to be a k-ARS for a given graph.Then, we complete the computations, by constructing a k-ARS with the required cardinality that gives the exact value.In the process, we make use of the following and simple result.
Remark 6.1 1 If G is a graph of maximum degree , then it is k-metric antidimensional for some k ≤ .
Proof of Proposition 3.1 L e t d e n o t e t h e d o m a i n d e t e r m i n e d by t h e f e a s i b l e s o l u t i o n s t o F , i .e ., � = {(s, q) : s ∈ {0, 1} n , q ∈ {0, 1} n 2 satisfy (2) − (6)}.Proposition 4.1 Any feasible solution (s, q) ∈ � determines a k-ARS. https://doi.org/10.1038/s41598-023-40165-x

Table 1 .
AnonymityTo avoid multiple representations of the same solution, each Q-subset has a unique representative, which is its lowest index vertex.

Table 3 .
Summary of results for P C instances (cylinders P r C s ).

Table 4 .
Summary of results for C C instances (torus C r C s ).

Table 6 .
Summary of results for S instances: sparse graphs with n vertices and vertex degree δ.

Table 7 .
Summary of results for D instances: dense graphs with n vertices and degree δ.

Table 8 .
Optimal values for T instances for varying values of δ and k.

Table 9 .
Optimal values for S instances for varying values of δ and k.